
package com.zsrt.examsystem.client;

import java.util.List;
import java.util.Scanner;

import com.zsrt.examsystem.MethodUtil;
import com.zsrt.examsystem.stduententity.Student;

public class Exam {

	private static Scanner scanner = new Scanner(System.in);
	public static void main(String[] args) {
		
		//考生信息是全局定死的
		List<Student> students = MethodUtil.studentMessage();
		//Methods methods = new Methods();
		
		//主方法开始的地方
		while(true){
			//先进入一级界面
			
			MethodUtil.firstPage();
			int num = scanner.nextInt();
			
			if(num==1){
				//进入管理员登录界面
				MethodUtil.adminLoginPage(scanner);
				/*boolean a =MethodUtil.adminLoginPage(scanner);
				//登录成功
				if(a==true){
					
					MethodUtil.secondAdminPage();
					int num1 = scanner.nextInt();
					if(num1==1){
						//操作数为1  录入考生信息
						methods.addStuInformathion();
						
					}else if(num1==2){
						//操作数为2 修改考生信息   
						//输入你想修改的信息
						Student student=MethodUtil.printStudent(scanner);
						methods.updateStuInformation(students, student);
						
					}else if(num1 ==3){
						//操作数为3  删除考生信息   
						//输入你想修改的信息
						Student student=MethodUtil.printStudent(scanner);
						
						methods.deleteStuInformation(students, student);
					}else if(num1==4){
						//操作数为4  查询考生信息   
						MethodUtil.queryStudentMenu();
						int num2 = scanner.nextInt();
						
						if(num2==1){
							//操作数为1  打印所有考生信息
							methods.printAllStudent(students );
							
						}else if(num2==2){
							// 操作数为2  根据户籍查询考生信息     
							String orderHuji = scanner.next();
							methods.printStudentByHuji(students, orderHuji);
							
						}else if(num2==3){
							// 操作数为3  根据姓名查询考生信息  
							
							String orderName = scanner.next();
							methods.printStudentByName(students, orderName );
							
						}else if(num2==4){
							// 操作数为4   根据准考证号查询考生信息
							
							String orderIdExam = scanner.next();
							methods.printStudentByidExam(students, orderIdExam );
						}else {
							//返回上一层
							MethodUtil.secondAdminPage();
							
						}*/
						
			}else if(num==2){
					
				
				//进入考生登录界面
				MethodUtil.studentLoginPage(scanner, students );
				
				
			}else{
				System.err.println("您已成功退出主方法。");
				//退出
				return;
			}
		}	
	}

	
	
	
	
}
